#ifdef WX_PRECOMP
#include "wx_pch.h"
#endif

#ifdef __BORLANDC__
#pragma hdrstop
#endif //__BORLANDC__

#ifdef __GNUG__
#pragma implementation
#pragma interface
#endif

#include <wx/textctrl.h>

#include "wxSalmonApp.h"
#include "wxSalmonFrame.h"

#include "Types.h"
#include "Setting.h"
#include "FEMModel.h"
#include "Main.h"


#include <iostream>



IMPLEMENT_APP(wxSalmonApp);

const Real VIEW_ASPECT = 1.3;


// Main program equivalent, creating windows and returning main app frame
bool wxSalmonApp::OnInit(void)
{
    // Create the main frame window
    int wp = (int) GetNumberSetting("window-size");
    int ws = (int) GetNumberSetting("window-position");
	
	std::cout << ws << ' ' << wp << std::endl;

    wxSalmonFrame* frame = new wxSalmonFrame(NULL, "Salmon surgery simulation testbed",
					 wxPoint(wp, wp), wxSize(ws, ws));
    
	frame->SetFEMModel( MyMain(argc, argv) );



	// Show the frame
    frame->Show(TRUE);

    return TRUE;
}
